//
//  ReqObject.m
//  iCarStyle
//
//  Created by liunian on 13-9-11.
//  Copyright (c) 2013年 liunian. All rights reserved.
//

#import "ReqObject.h"

@implementation ReqObject

- (id)initWithCatalogType:(CatalogType)type pageNum:(NSInteger)page;
{
    self = [super init];
    if (self) {
        // Custom initialization
        self.type = type;
        self.pageNum = page;
    }
    return self;
}

- (void)setIsLoading:(BOOL)isLoading{
    if (_isLoading != isLoading) {
        _isLoading = isLoading;
    }
}

- (NSString *)cUrl{
    switch (_type) {
        case ALL:
        {
            return [NSString stringWithFormat:@"%@/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case MRZS:
        {
            return [NSString stringWithFormat:@"%@/mrzs/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case YHZS:
        {
            return [NSString stringWithFormat:@"%@/yfzs/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case WXZS:
        {
            return [NSString stringWithFormat:@"%@/wxzs/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case GZZS:
        {
            return [NSString stringWithFormat:@"%@/gzzs/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case CJZS:
        {
            return [NSString stringWithFormat:@"%@/cjzs/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case QCYP:
        {
            return [NSString stringWithFormat:@"%@/cyp/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;
        case BXZS:
        {
            return [NSString stringWithFormat:@"%@/bszh/index_%d.html",kNewsSiteAPI,_pageNum];
        }
            break;

            //图解新车
        case TJXC:
        {
        return [NSString stringWithFormat:@"%@/type-1_%d.html",kPicSiteAPI,_pageNum];
        }
            break;
            //酷车鉴赏
        case KCXS:
        {
        return [NSString stringWithFormat:@"%@/type-3_%d.html",kPicSiteAPI,_pageNum];
        }
            break;
            //汽车生活
        case QCSH:
        {
        return [NSString stringWithFormat:@"%@/type-4_%d.html",kPicSiteAPI,_pageNum];
        }
            break;
            //靓丽车模
        case LLCM:
        {
        return [NSString stringWithFormat:@"%@/type-5_%d.html",kPicSiteAPI,_pageNum];
        }
            /*
            break;
            //车展车模
        case CZCM:
        {
        return [NSString stringWithFormat:@"%@/type-155_%d.html",kPicSiteAPI,_pageNum];
        }
            break;
            //车展图片
        case CZTP:
        {
        return [NSString stringWithFormat:@"%@/type-156_%d.html",kPicSiteAPI,_pageNum];
        }
            break;
             */
        default:
            break;
    }
    return nil;
}

@end
